﻿using HoverTree.Model;
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;

namespace HoverTreeMobile.HvtAdmin
{
    public partial class PanelUserList : System.Web.UI.Page
    {
        protected int _totalCount, _totalPageCount, _pageIndex, _pageSize;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (HttpContext.Current.User.Identity.Name != "hovertree")//超级管理员
            {
                Response.Redirect("index.aspx");
            }

            _pageIndex = 1;
            _pageSize = 99999;

            List<PanelUserInfo> m_list = new List<PanelUserInfo>();
            m_list = new HoverTree.BLL.HvtPanelUser().HvtPageQuery(2, _pageSize, _pageIndex, out _totalCount, out _totalPageCount);

            rptList.DataSource = m_list;
            rptList.DataBind();
        }

        [WebMethod]
        public static string Delete(int hvtid)
        {
            if (hvtid < 1)
                return "ID错误";

            return new HoverTree.BLL.HvtPanelUser().Delete(hvtid);

        }
    }
}